<template>
	<el-table :data="tableData" style="width: 100%; margin-bottom: 20px" row-key="id" border>
		<el-table-column type="index" label="序号" width="80" />
		<el-table-column prop="resourceName" label="数据资源名称" />
		<el-table-column prop="dataProvider" label="数据提供方" />
		<el-table-column prop="application" label="所属应用" />
		<el-table-column prop="applicationCode" label="所属应用代码" />
		<el-table-column prop="classification" label="数据资源格式分类">
			<template #default="scope">{{ dictionary.classification(scope.row.classification) }}</template>
		</el-table-column>
		<el-table-column prop="type" label="数据资源格式类型" />
		<el-table-column prop="domain" label="数据所属领域">
			<template #default="scope">{{ dictionary.businessArea(scope.row.domain) }}</template>
		</el-table-column>
		<el-table-column prop="level" label="数据敏感级别">
			<template #default="scope">{{ dictionary.secretLevel(scope.row.level) }}</template>
		</el-table-column>
		<el-table-column prop="coreFields" label="数据资源核心字段" />
	</el-table>
</template>

<script lang="ts" setup>
import dictionary from '../dictionary.js';
import { toRefs, defineProps } from 'vue';

const props = defineProps({
	tableData: Array,
});

const { tableData } = toRefs(props);
</script>

<style lang="scss" scoped></style>
